﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _查询测试
{
    public class BaseContext : DbContext
    {
        public BaseContext() : base("name=Default")
        {
        }
        public BaseContext(string s)
         : base(s)
        {
        }

        public DbSet<Student> Student { get; set; }
        public DbSet<StuFraction> StuFraction { get; set; }

        //生成的实体 去复数s
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }
    }
}
